<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Art-template</title>
</head>
<body>
    <script src="node_modules/art-template/lib/template-web.js"></script>
    <script type="text/template" id="tpl">
        大家好，我叫：{{name}}
        我今年 {{age}} 岁了
        我来自 {{province}}
        我喜欢: {{each hobbies}} {{ $value }} {{/each}}
    </script>
    <script>
        var ret = template('tpl',{
            name: 'Rose',
            age: 22,
            province: '北京',
            hobbies: [
                '唱歌',
                '跳舞',
                '打豆豆'
            ]
        })
        console.log(ret)
    </script>
</body>
</html>